package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"zuhao-seucre/internal/model/input"
	"zuhao-seucre/internal/model/vo"
)

type ValueReq struct {
	g.Meta `path:"/sys/configs/value" tags:"system接口" method:"get" summary:"根据key获取对应的value值"`
	Key    string `p:"key" v:"required#key不能为空"`
}
type ValueRes string

type CaptchaReq struct {
	g.Meta `path:"/sys/captcha" tags:"system接口" method:"get" summary:"获取验证码接口"`
}
type CaptchaRes struct {
	Base64Captcha string `json:"base64Captcha"`
	Cid           string `json:"cid"`
}

type PermissionsReq struct {
	g.Meta `path:"/sys/accounts/permissions" tags:"system接口" method:"get" summary:"获取用户权限列表"`
}
type PermissionsRes struct {
	Menus       []*input.ResourceItem `json:"menus"`
	Permissions []string              `json:"permissions"`
}

type GetUserInfoReq struct {
	g.Meta `path:"/sys/accounts/self" tags:"system接口" method:"get" summary:"获取用户信息"`
}
type GetUserInfoRes struct {
	Roles []*vo.AccountRoleVO `json:"roles"` // 角色信息
}
